
package com.ifatter.http;

import android.content.Context;

public class APISupport {

    protected final HttpClient http;

    public APISupport(Context context) {
        http = HttpClient.getInstance(context.getApplicationContext());
    }

    public Response get(String url) throws HttpException {
        return http.get(url);
    }

    public Response get(String url, boolean ssl) throws HttpException {
        return http.get(url, ssl);
    }

    public Response get(String url, String rangValue) throws HttpException {
        http.setRequestHeader("Range", rangValue);
        return http.get(url);
    }

    public Response post(String url, PostParameter[] postParameters) throws HttpException {
        return http.post(url, postParameters);
    }

    public Response post(String url, PostParameter[] postParameters, boolean ssl)
            throws HttpException {
        return http.post(url, postParameters, ssl);
    }

}
